body {
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    background: #0C0B0B;
    color: #fff;
    overflow-y: scroll;
}

body::-webkit-scrollbar {
    display: none;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: #000000;
    width: 260px;
    min-width: 200px;
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 20px;
}

.logo-block {
    margin-bottom: 40px;
}

.logo {
    width: 140px;
    display: block;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 32px;
    color: #fff;
    font-size: 1.08rem;
    border-radius: 24px 0 0 24px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav li.active,
.sidebar-nav li:hover {
    color: #FFC72C;
}

.sidebar-nav .icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-area {
    width: 100%;
    padding: 0px 32px 32px 32px;
}

.main-content {
    flex: 1;
    padding: 40px 32px 32px 32px;
    background: #0C0B0B;
    min-width: 0;
}

.games-block {
    margin-bottom: 40px;
}

.games-block h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #fff;
}

.games-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    grid-template-rows: repeat(1, 1fr);
}

.game-placeholder {
    background: linear-gradient(135deg, #23201e 60%, #181616 100%);
    border-radius: 18px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFC72C;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 12px 0 #0002;
    position: relative;
}

.game-large .game-placeholder {
    height: 100%;
}

.game-placeholder::after {
    content: 'Game';
    color: #FFC72C;
    opacity: 0.7;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        flex-direction: row;
        width: 100%;
        min-width: 0;
        padding: 0;
        justify-content: flex-start;
        align-items: flex-start;
        height: auto;
        border-radius: 0 0 24px 24px;
        height: 100px;
    }

    .logo-block {
        margin: 16px 16px 16px 24px;
    }

    .sidebar-logo {
        display: none;
    }

    .sidebar-nav ul {
        display: flex;
        flex-direction: row;
        gap: 0;
    }

    .sidebar-nav li {
        border-radius: 24px;
        padding: 10px 16px;
        font-size: 1rem;
    }

    .main-content {
        padding: 24px 8px 8px 8px;
    }
}

@media (max-width: 600px) {
    .games-list {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 14px;
    }

    .sidebar {
        padding: 0;
    }

    .logo {
        width: 90px;
    }

    .main-content {
        padding: 12px 2vw;
    }

    .games-block h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .game-placeholder {
        height: 90px;
        font-size: 0.9rem;
    }
}

/* Header styles */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0 24px 0;
    background: #0C0B0B;
    gap: 24px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #948f87;
    border-radius: 16px;
    padding: 0 18px;
    height: 50px;
    flex: 1 1 0;
    max-width: 700px;
}

.search-form input {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    width: 100%;
    margin-left: 10px;
}

.search-form input::placeholder {
    color: #fff;
    opacity: 0.9;
}

.search-icon {
    display: flex;
    align-items: center;
    color: #fff;
}

.header-buttons {
    display: flex;
    gap: 16px;
}

.header-btn {
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    padding: 0 32px;
    height: 50px;
    cursor: pointer;
    transition: box-shadow 0.15s, background 0.15s, color 0.15s;
}

.login-btn {
    background: #fff;
    color: #ff1663;
    box-shadow: 0 4px 0 #b71c3b22;
}

.signup-btn {
    background: #ff1663;
    color: #fff;
    box-shadow: 0 4px 0 #b71c3b22;
}

.header-btn:active {
    box-shadow: none;
}

/* Hero block */
.hero-block {
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 450px;
    border-radius: 18px;
    border: 2px solid #ffc72c44;
    background: #181616;
    box-shadow: 0 2px 16px 0 #0003;
}

/* Game links and hover effect */
.game-link {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.18s;
}

.game-link:focus {
    outline: 2px solid #FFC72C;
}

.game-link:hover .game-placeholder,
.game-link:focus .game-placeholder {
    box-shadow: 0 0 0 4px #ff1663cc;
}

.game-link:hover::after,
.game-link:focus::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #ff1663cc;
    opacity: 0.92;
    z-index: 2;
    border-radius: 18px;
    display: block;
}

.game-link:hover .play-icon,
.game-link:focus .play-icon {
    opacity: 1;
}

.game-link .play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
    box-shadow: 0 2px 8px #0002;
}

.game-link:hover .play-icon,
.game-link:focus .play-icon {
    opacity: 1;
}

.game-link .play-icon svg {
    width: 40px;
    height: 40px;
    fill: #ff1663;
}

/* Popular games grid: first item large */
.popular-games-list {
    display: grid;
    grid-template-columns: 1.5fr repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 24px;
}

.popular-games-list .game-link.game-large {
    grid-row: span 2;
    grid-column: span 1;
    height: 100%;
}

.popular-games-list .game-link {
    height: 100%;
}

@media (max-width: 1200px) {
    .popular-games-list {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .main-header {
        align-items: stretch;
        gap: 16px;
        padding: 18px 0 12px 0;
    }

    .hero-block {
        margin-bottom: 18px;
    }

    .popular-games-list {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(7, 1fr);
        gap: 14px;
    }

    .games-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .main-header {
        padding: 8px 0 6px 0;
    }

    .search-form {
        height: 38px;
        border-radius: 10px;
        padding: 0 8px;
        font-size: 0.9rem;
    }

    .header-btn {
        height: 38px;
        font-size: 0.95rem;
        padding: 0 16px;
        border-radius: 10px;
    }

    .hero-img {
        border-radius: 10px;
    }

    .popular-games-list {
        grid-auto-rows: 90px;
    }

    .popular-games-list .game-link.game-large {
        grid-row: span 2;
    }
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popup-fade-in 0.32s cubic-bezier(.4, 0, .2, 1);
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.popup {
    background: #181616;
    border-radius: 18px;
    padding: 32px 24px 24px 24px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 4px 32px #0008;
    position: relative;
    color: #fff;
}

.popup h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.3rem;
    color: #FFC72C;
}

.popup form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #948f87;
    background: #23201e;
    color: #fff;
    font-size: 1rem;
}

.popup button[type="submit"] {
    background: #ff1663;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 8px;
    cursor: pointer;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.popup-error {
    margin-top: 10px;
    color: #ff1663;
    font-size: 1.05rem;
    min-height: 24px;
}

.error-msg {
    background: #fff0f3;
    color: #ff1663;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    margin-top: 6px;
}

/* Sidebar link styles */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.sidebar-link:visited {
    color: inherit;
}

.sidebar-link:hover,
.sidebar-link:focus {
    color: #FFC72C;
}

/* Burger menu styles */
.burger-btn {
    display: none;
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 2;
    background: #181616;
    border: none;
    border-radius: 12px;
    padding: 6px 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px #0003;
}

.burger-btn svg {
    display: block;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    color: #FFC72C;
    font-size: 2.2rem;
    z-index: 2;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
}

.sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 0 0 32px #000a;
}

.sidebar-overlay-show {
    display: block;
}

@media (max-width: 900px) {
    .burger-btn {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100px;
        background: #181616;
        z-index: 2;
        box-shadow: 0 2px 12px #0003;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-direction: row;
        padding: 0 16px;
        transition: none;
    }

    .sidebar-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 64px;
        padding-inline: 20px;
    }

    .logo-block {
        margin: 0;
    }

    .logo {
        width: 110px;
        height: auto;
    }

    .burger-btn {
        display: block;
        position: static;
        background: none;
        box-shadow: none;
        border-radius: 10px;
        padding: 4px 8px;
        z-index: 2;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 100vh;
        background: #181616;
        z-index: 2;
        transform: translateX(-110%);
        transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
        box-shadow: 0 0 32px #000a;
        padding-top: 32px;
        border-radius: 0 18px 18px 0;
    }

    .sidebar-nav.sidebar-nav-open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
        position: absolute;
        top: 18px;
        right: 18px;
        background: none;
        border: none;
        color: #FFC72C;
        font-size: 2.2rem;
        z-index: 2;
        cursor: pointer;
    }

    .sidebar-nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 32px;
    }

    .sidebar-nav li {
        border-radius: 0 24px 24px 0;
        padding: 14px 32px;
        font-size: 1.08rem;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        z-index: 1;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.55);
    }

    .sidebar-overlay.sidebar-overlay-show {
        display: block;
    }

    .main-area {
        padding-top: 100px;
    }

    .container {
        flex-direction: column;
    }

    .main-area {
        padding-inline: 20px;
    }
}

@media (min-width: 901px) {

    .sidebar-topbar,
    .sidebar-close,
    .sidebar-overlay {
        display: none !important;
    }

    .sidebar-nav {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        padding-top: 0 !important;
        border-radius: 0 !important;
        height: auto !important;
        width: 100% !important;
    }
}

/* Footer styles */
.footer {
    margin-top: 48px;
    padding: 0 0 32px 0;
    width: 100%;
}

.footer-support {
    background: #3a312e;
    border-radius: 20px;
    margin: 0 auto 12px auto;
    padding: 18px 24px;
    max-width: 96vw;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
}

.footer-btn {
    background: #19e38a;
    color: #222;
    font-weight: 700;
    font-size: 1.18rem;
    border: none;
    border-radius: 14px;
    padding: 8px 28px;
    margin: 0 8px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
    display: inline-block;
    box-shadow: 0 2px 8px #19e38a33;
    transform: translateY(0);
}

.footer-btn:hover {
    background: #13c97a;
    color: #fff;
    box-shadow: 0 6px 24px #19e38a55;
    transform: translateY(-2px) scale(1.04);
}

.footer-legal {
    color: #bdbdbd;
    font-size: 1.02rem;
    text-align: left;
    margin: 0 24px;
    max-width: 1200px;
}

.footer-brand {
    color: #FFC72C;
    font-weight: 700;
}

@media (max-width: 900px) {
    .footer-support {
        flex-direction: column;
        gap: 10px;
        font-size: 1.05rem;
        padding: 12px 8px;
    }

    .footer-legal {
        font-size: 0.95rem;
        margin: 0 8px;
    }
}

@media (max-width: 600px) {
    .footer-support {
        font-size: 0.92rem;
        padding: 8px 2vw;
        border-radius: 10px;
    }

    .footer-btn {
        font-size: 0.98rem;
        padding: 6px 12px;
        border-radius: 8px;
    }

    .footer-legal {
        font-size: 0.85rem;
        margin: 0 2vw;
    }
}

/* Prefooter styles */
.prefooter-block {
    position: relative;
    background: #0C0B0B;
    padding: 32px 0 48px 0;
    overflow: hidden;
    z-index: 1;
}

.prefooter-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.prefooter-logo {
    width: 120px;
    min-width: 80px;
    height: auto;
    display: block;
}

.prefooter-text {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.5;
}

.prefooter-brand {
    color: #FFC72C;
    font-weight: 700;
}

.prefooter-link {
    color: #FFC72C;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.18s;
}

.prefooter-link:hover {
    color: #ff1663;
}

.prefooter-bg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: url('data:image/svg+xml;utf8,<svg width="1440" height="80" viewBox="0 0 1440 80" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 80L60 70C120 60 240 40 360 40C480 40 600 60 720 70C840 80 960 80 1080 60C1200 40 1320 0 1380 0H1440V80H0Z" fill="%23101010"/><g opacity="0.5"><rect x="1200" y="20" width="20" height="40" rx="5" fill="%23000"/><rect x="1250" y="30" width="10" height="30" rx="3" fill="%23000"/><rect x="1300" y="10" width="15" height="60" rx="4" fill="%23000"/></g></svg>') repeat-x bottom;
    background-size: cover;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 900px) {
    .prefooter-inner {
        flex-direction: column;
        gap: 18px;
        text-align: center;
    }

    .prefooter-logo {
        margin-bottom: 10px;
    }

    .prefooter-block {
        padding: 18px 0 32px 0;
    }
}

@media (max-width: 600px) {
    .prefooter-inner {
        gap: 10px;
    }

    .prefooter-logo {
        width: 80px;
    }

    .prefooter-text {
        font-size: 1.05rem;
    }

    .prefooter-bg {
        height: 40px;
    }
}

/* Game image styles */
.game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    background: linear-gradient(135deg, #23201e 60%, #181616 100%);
}

/* About page styles */
.about-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 18px;
    padding-left: 10px;
    position: relative;
}

.about-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.about-back-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #181616;
    border: 2px solid #fff;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    transition: background 0.18s, border 0.18s, box-shadow 0.18s, transform 0.18s;
    margin-left: 18px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.about-back-btn:hover,
.about-back-btn:focus {
    background: #FFC72C;
    border-color: #FFC72C;
    box-shadow: 0 2px 12px #ffc72c44;
}

.about-content-block {
    background: #181616;
    border-radius: 18px;
    padding: 38px 38px 32px 38px;
    max-width: 900px;
    margin: 0 auto;
    color: #fff;
    font-size: 1.18rem;
    box-shadow: 0 2px 16px #0003;
}

.about-content-block h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 18px;
}

.about-content-block h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 8px;
}

.about-content-block p {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.08rem;
    color: #fff;
}

@media (max-width: 900px) {
    .about-header-row {
        margin-bottom: 18px;
    }

    .about-title {
        font-size: 1.3rem;
    }

    .about-back-btn {
        width: 38px;
        height: 38px;
        margin-left: 0;
    }

    .about-content-block {
        padding: 18px 8px 18px 8px;
        font-size: 1rem;
    }
}

/* Checkbox label in popup */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #fff;
    margin: 8px 0 0 0;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #FFC72C;
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.checkbox-label a {
    color: #FFC72C;
    text-decoration: underline;
    transition: color 0.18s;
}

.checkbox-label a:hover {
    color: #ff1663;
}